
<html lang="zh" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>{%block title%}乾初九，潜龙勿用--一个学习型的娱乐博客{%endblock%}</title>
    <meta name="keywords" content="古风博客，古风，花满楼，python学习,mysql学习，
    数据分析学习,数据库学习，执玖">
    <meta name="description" content="一个对古风涉猎不多的茶、扇、古典诗词爱好者，一
    个砥砺前行在数据之路上的菜鸟，不间断输出python、mysql、数据分析学习笔记,闲暇时谱点诗
    歌，伴随型百合小说挖坑。">

    <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
    <link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
    {%block stylesheet%}
    <link rel="stylesheet" href="{{url_for('static',filename='css/blog_index.css')}}">
    <link rel="stylesheet" href="{{url_for('static',filename='css/font-awesome.css')}}">
    {%endblock%}
    {%block script%}
    <script type="text/javascript" src="{{url_for('static',filename='js/jquery.min.js')}}"></script>
    {%endblock%}
  <body>
    <script type="text/javascript">
      $(document).ready(function(){
        $("#header").hide().fadeIn(900);
        $("img.banner").hide().fadeIn(400);

      })
    </script>
    <!--这里部署页面级页眉，每个页面都是它-->
    <!--div其实就是把内容放在n个区域内，然后用css实现对这n个区域的排布，当然，每个div就最好有个名字-->
    <header role="banner" class="header" id="header">
    <!--顶部icon和搜索，可以索引回页面-->
      <div class="icon-search-login">
        <div class="icon-search">
          <a href="/" class="upicon"><img src="{{ url_for('static',filename='img/index-icon.png')}}"
          height=60px width=60px alt="一张帅图"></a>
          <h4>东南有星，居四方亦逐之</h4>
        </div>

        <div class='search-login'>
          <!--这里部署全局搜索框，暂时先这样吧，这是个表单-->
          <form class="search" action="index.html" method="post">
            <input type="search" name="" value="" placeholder="Search" class="search">
            <button type="submit" class="searchbtn"></button>
          </form>
          <!-- 这里部署管理员登陆，用来上传后台文件 -->
          <form class="login" action="index.html" method="post">
            <div class='login'><a href="/adminlogin">Admin Login</a></div>
          </form>
        </div>
      </div>


    <!--这里部署了导航栏-->
      <div class="nav">
        {%block nav%}
        <nav role="navigation">
          <ul class="navbar">
            <li class='nav'><a href="{{url_for('index')}}">Home</a></li>
            {% if nav %}
              {% for key in nav %}
                {% if nav.get(key)[0]%}
                  <li class='navdown'><a href="{{url_for('typelist',type=key)}}">{{key}}</a>
                    <ul class='dropdown'>
                      {%for k in nav.get(key)%}
                        <li><a href="{{url_for('labellist',label=k)}}">{{k}}</a></li>
                      {%endfor%}
                    </ul>
                  </li>
                {%else%}
                  <li class='nav'><a href="{{url_for('typelist',type=key)}}">{{key}}</a></li>
                {%endif%}
              {%endfor%}
            {%else%}
            {%endif%}
          </ul>
        </nav>
        {%endblock%}
      </div>

            <script type="text/javascript">
                $(document).ready(function(){
                  $(window).scroll(function(){
                    var nowtop = $(document).scrollTop();
                    if(nowtop>140)
                      $("div.nav").css({position:'fixed',top:0,"margin-left":0,"padding-left":"10%","width":"100%","background-color":"rgba(255,255,255,0.8)"})
                    else
                      $("div.nav").css({position:"static","margin-left":"10%","padding-left":0,"background-color":"white"})
                  })
                })
            </script>

    </header>
{%block banner%}
  <!--网站banner图-->
    <img src="{{url_for('static',filename='img/index-banner.png')}}" width="1920px" height="435px"alt="网站banner图" class="banner">
{%endblock%}

<div class="main clearfix">
  <!--这里部署主要内容,采用分栏布局，左为最近发布，右上为花满楼图，右下为书籍和游戏推荐-->
      <!--最近发表的文章，缩略图+简单文模式-->
      <div class="recent-publish">
        {%block main%}
        <h2>最新发布</h2>


        {%for item in pagination.items%}
        <article class="latestpost">
          <div class="articalpic">
            <img class="recent-artical" src="./static/img/tiance.jpg" alt="文章推荐">
          </div>
          <div class="articalcontent">
            <a href="#" class='articaltitle'>{{item[2]}}</a>
            <p class='publishtime'>{{item[0]}}</p>

            <p class="articalrecommedate">{{item[1]}}<a href="#">前往查看</a></p>
          </div>
        </article>
        {%endfor%}

        <ul class='pagination'>
                          {%if pagination.has_prev%}
                          <li><a href="{{url_for('index',page=pagination.page-1)}}"><</a></li>
                          {%else%}
                          <li class='disabled'><a><</a></li>
                          {%endif%}

                          {%for page in pagination.iter_pages(1,1,2,1)%}
                          {%if page%}
                            {%if page == pagination.page %}
                            <li class= 'active'><a href="{{url_for('index',page=page)}}">{{page}}</a></li>
                            {%else%}
                            <li><a href="{{url_for('index',page=page)}}">{{page}}</a></li>
                            {%endif%}
                          {%else%}
                            <li class='disabled'><a href="#">&hellip;</a></li>
                          {%endif%}
                          {%endfor%}

                          {%if pagination.has_next%}
                          <li><a href="{{url_for('index',page=pagination.page+1)}}">></a></li>
                          {%else%}
                          <li class='disabled'><a>></a></li>
                          {%endif%}
                        </ul>

        {%endblock%}
      </div>
      {%block asidebar%}
      <div class="asidebar">
          <!--花满楼图片推荐，定期更新-->
        <div class="handsomeman">
          <h2>花满心时亦满楼</h2>
          <img src="{{url_for('static',filename='img/huawhite1.png')}}" width="290px" height="560px"alt="一张花满楼简图">

        </div>

        <!--看过的书目推荐，缩略图+简介，索引到购书网站or可下载的文件连接-->
        <!--豆瓣书，尺寸是270*409-->
        <div class="recommedate-books">

          <h2>最近在看</h2>
          {%for book in rebook %}
          <div class="book">
            <div class="bookitem">
              <div class="bookpic">
                <img src="{{book[5]}}" alt="书籍图片" width="90px" height="140px">
              </div>
              <div class="bookcontent">
                <h5>{{book[0]}}</h5>
                <h6>{{book[1]}}</h6>
                <p>{{book[2]}}</p>
              </div>
              <div class="bookratio">
                <p>{{book[3]}}/10</p>
                <a href="{{book[4]}}">下载</a>
              </div>
            </div>
          </div>
          {%endfor%}

        </div>

        <!--好玩的游戏推荐，缩略图+简介，索引到游戏网站or可下载的文件连接-->
        <div class="recommedate-games">
          <h2>最近在玩</h2>
          {%for game in regame%}
          <div class="game">
            <div class="gameitem">
              <div class="gamepic">
                <img src="{{game[4]}}" alt="游戏图片" width="80px" height="80px">
              </div>
              <div class="gamecontent">
                <a href="{{game[3]}}">{{game[0]}}</a>
                <h6>{{game[1]}}</h6>
              </div>
              <div class="gameratio">
                <p>{{game[2]}}/10</p>
                <a href="{{game[3]}}">下载</a>
              </div>
            </div>
          </div>
          {%endfor%}
        </div>

      </div>
      {%endblock%}
</div>

  <!--这里部署页面级页脚-->
  {%block footer%}
<footer class="footer">
  <div class="foot-container">
    <div class="shortintro">
      <div class="footicon">
        <img src="{{ url_for('static',filename='img/index-icon.png')}}" alt="网站logo" height="80px" width="80px">
      </div>
    <p>   想要记录的东西分类很杂，为了让自己
    保持好记录的习惯。也为了让自己能够将
    知识体系搭建起来，我创建了这个博客。
        不为证明什么，我只想要,
        脚踏实地，坚定地走下去。<br>
        仅此，而已。
        执玖  拜上</p>
    </div>
    <div class="contact">
      <h2>Contact</h2>
      <p>Tel:(86)18868130372 <br> Email:407282152@qq.com</p>
    </div>

    <div class="writetome">
			<h2>Write to me</h2>
			<form action="" method="post" class="write">
				<div class="writerinfo">
					<input type="text" name="w3lName" placeholder="FIRST NAME" required="">
					<input type="text" name="w3lName" placeholder="LAST NAME" required="">
					<input type="email" name="w3lSender" placeholder="EMAIL" required="">
				</div>

				<div class="writecontent">
					<textarea name="w3lMessage" placeholder="MESSAGE" required=""></textarea>
					<div class="send-button">
						<input type="submit" class="write" value="SEND">
					</div>
				</div>
			</form>
		</div>

  </div>
  <div class="copyright">
    <p><small>Copyright©2020-Nine All rights reserved</small></p>
  </div>
</footer>
  {%endblock%}
  <!--这里部署回到顶部 -->
<div class="scrolltop"></div>
<script type="text/javascript">
  $(function(){
    $(document).ready(function(){
      $(window).scroll(function(){
        if($(document).scrollTop()>500)
          $("div.scrolltop").fadeIn(750);
        else
          $("div.scrolltop").fadeOut(750);
        })
      })

    $("div.scrolltop").click(function(){
      $('html,body').animate({scrollTop:"0px"},1000);
    })
});
</script>



  </body>

</html>
